home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.esc;
-
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.GridBagConstraints;
- import java.awt.GridBagLayout;
- import java.awt.Insets;
- import javax.swing.Icon;
- import javax.swing.JComponent;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.border.SoftBevelBorder;
-
- class BaseStatusBar$SBArea extends JPanel implements BaseStatusBar.IStatusBar {
- // $FF: renamed from: id java.lang.String
- protected String field_0 = "id1";
- protected int H_TEXTINSET = 14;
- protected SoftBevelBorder sbb;
- protected float percentWidth;
- protected boolean dinamicWidth;
- private int pos = -1;
- private int width = -1;
- private int height = -1;
- JLabel label;
-
- BaseStatusBar$SBArea(String var1, float var2, boolean var3) {
- super(new GridBagLayout());
- GridBagConstraints var4 = new GridBagConstraints();
- this.field_0 = var1;
- this.percentWidth = var2;
- this.dinamicWidth = var3;
- this.sbb = new SoftBevelBorder(1, Color.white, Color.lightGray, Color.lightGray, Color.gray);
- ((JComponent)this).setBorder(this.sbb);
- var4.insets = new Insets(0, 0, 0, 0);
- var4.gridx = 0;
- var4.gridy = 0;
- var4.weightx = (double)1.0F;
- var4.weighty = (double)1.0F;
- var4.anchor = 17;
- var4.fill = 1;
- this.label = new JLabel("");
- ((Container)this).add(this.label, var4);
- }
-
- BaseStatusBar$SBArea(String var1, int var2, int var3) {
- }
-
- public Dimension getPreferredSize() {
- this.refreshPosAndWidth();
- return new Dimension(this.width, this.height);
- }
-
- public String getID() {
- return this.field_0;
- }
-
- public String getLabelText() {
- return this.label.getText();
- }
-
- public void setLabelText(String var1) {
- this.label.setText(var1);
- }
-
- public Icon getStatusBarIcon() {
- return this.label.getIcon();
- }
-
- public void setStatusBarIcon(Icon var1) {
- this.label.setIcon(var1);
- }
-
- public float getPercentWidth() {
- return this.percentWidth;
- }
-
- public void setPercentWidth(float var1) {
- this.percentWidth = var1;
- }
-
- public JPanel getPanel() {
- return this;
- }
-
- private void refreshPosAndWidth() {
- Container var1 = ((Component)this).getParent();
- int var2 = ((Component)var1).getSize().width;
- if (this.dinamicWidth || this.width < 0) {
- float var3 = (float)var2 * this.percentWidth;
- this.width = (new Float(var3)).intValue();
- }
-
- if (this.height < 0) {
- this.height = ((Component)this).getFontMetrics(((Component)this).getFont()).getHeight() + 4;
- }
-
- }
- }
-